<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<div class="voc-tabs tabs-fav-lists">
Here are the vocabulary lists that you currently study. You can populate below list by saving the lists in "your lists" or "find vocabulary lists".
<p>
<c:choose>
	<c:when test="${loginOkay == ''}">
		<div class="error-message">Error: You need to log in to see your favorite vocabulary lists</div>
	</c:when>
	<c:otherwise>
		<c:if test="${empty searchFavVocResList}">
			<i>You have not add any vocabulary to your favorites</i>
		</c:if>
	</c:otherwise>
</c:choose>
<c:if test='${not empty searchFavVocResList && not loginOkay.equals("")}'>
<table class="fav-voc-lists">
	<colgroup>
	<col span="1" style="display:none"/>
	<col span="1" style="width:auto; white-space:nowrap;"/>
	<col span="1" style="width:1%; white-space:nowrap;"/>
	<col span="1" style="width:auto; white-space:nowrap;"/>
	<col span="1" style="width:1%; white-space:nowrap;"/>
	</colgroup>
		<tr><td colspan="4">
			<div class="pagination fav-voc-pagination">
				<a href="#" class="first" data-action="first">&laquo;</a>
				<a href="#" class="previous" data-action="previous">&lsaquo;</a>
				<form:form class="inline-form" id="searchFavList" action="/learnlang/vocabularyPage/favVocListSearch" modelAttribute="searchFavVocListInfo" method="POST">
					<input type="text" readonly="readonly" data-current-page="${searchFavVocListInfo.getPageIdx()}" 
						data-max-page="${searchFavVocListInfo.getPageMaxIdx()}"/>
				</form:form>				
				<a href="#" class="next" data-action="next">&rsaquo;</a>
				<a href="#" class="last" data-action="last">&raquo;</a>
			</div> <!-- pagination -->
		</td></tr>
		<tr>
			<th class="voc-list-col-0">hidden-rowid</th>
			<th class="voc-list-col-1">Name</th>
			<th class="voc-list-col-2">From-To Language</th>
			<th class="voc-list-col-3">Tags</th>
			<th class="voc-list-col-4">Actions</th>
		</tr>
	<c:forEach items="${searchFavVocResList}" var="vocList">
		<tr>
			<td class="voc-list-col-0">${vocList.getVocListId()}</td>
			<td class="voc-list-col-1"><div><span><c:out value="${vocList.getName()}"/></span></div></td>
			<td class="voc-list-col-2"><c:out value="${vocList.getFromLangText()}"/>-<c:out value="${vocList.getToLangText()}"/></td>
			<td class="voc-list-col-3"><div><span><c:out value="${vocList.getTags()}"/></span></div></td>
			<td class="voc-list-col-4">
				<a class="fav-voc-exercise" href="#">Exercise</a>&nbsp;
				<a class="fav-voc-view" href="#"><span class="ui-icon ui-icon-folder-open"></span></a>&nbsp;
				<form:form class="inline-form" action="/learnlang/vocabularyPage/favVocList/${vocList.getRowId()}" method="delete">
					<a class="fav-voc-remove" title="Removes this vocabulary list from your favorites" href="#"><span class="ui-icon ui-icon-trash"></span></a>
				</form:form>
			</td>
		</tr>
	</c:forEach>
</table>
</c:if>
</div>

